﻿package com.gamemeal.facebook {
	/**
	 * @author Colin
	 */
	public class Events {
		public static const RSVP_STATUS_ATTENDING:String ="attending";
		public static const RSVP_STATUS_UNSURE:String    ="unsure";
		public static const RSVP_STATUS_DECLINED:String  ="declined ";
		public static const RSVP_STATUS_NOTREPLIED:String="not_replied";

		public static function get(api_key:String,session_key:String,call_id:Number,v:String="1.0",format:String="XML",callback:String="",uid:int=0,eids:Array=null,start_time:int=0,end_time:int=0,rsvp_status:String=""):Array{
			var a:Array = new Array();
			a['method'] = 'facebook.events.get';
			a['api_key'] = api_key;
			a['session_key'] = session_key;
			a['call_id'] = call_id;
			a['v'] = v;
			if(format!='XML')a['format']=format;
			if(callback!="")a['callback']=callback;
			if(uid!=0)a['uid']=uid;
			if(eids!=null)a['eids']=eids.join(",");
			if(start_time!=0)a['start_time']=start_time;
			if(end_time!=0)a['end_time']=end_time;
			if(rsvp_status!="")a['rsvp_status']=rsvp_status;
			return a;
		}
	}
}
